package com.supermap.greendao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.supermap.search.javabean.CollectBean;
import com.supermap.search.javabean.XunJianOneTime;

import com.supermap.greendao.CollectBeanDao;
import com.supermap.greendao.XunJianOneTimeDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig collectBeanDaoConfig;
    private final DaoConfig xunJianOneTimeDaoConfig;

    private final CollectBeanDao collectBeanDao;
    private final XunJianOneTimeDao xunJianOneTimeDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        collectBeanDaoConfig = daoConfigMap.get(CollectBeanDao.class).clone();
        collectBeanDaoConfig.initIdentityScope(type);

        xunJianOneTimeDaoConfig = daoConfigMap.get(XunJianOneTimeDao.class).clone();
        xunJianOneTimeDaoConfig.initIdentityScope(type);

        collectBeanDao = new CollectBeanDao(collectBeanDaoConfig, this);
        xunJianOneTimeDao = new XunJianOneTimeDao(xunJianOneTimeDaoConfig, this);

        registerDao(CollectBean.class, collectBeanDao);
        registerDao(XunJianOneTime.class, xunJianOneTimeDao);
    }
    
    public void clear() {
        collectBeanDaoConfig.clearIdentityScope();
        xunJianOneTimeDaoConfig.clearIdentityScope();
    }

    public CollectBeanDao getCollectBeanDao() {
        return collectBeanDao;
    }

    public XunJianOneTimeDao getXunJianOneTimeDao() {
        return xunJianOneTimeDao;
    }

}
